package com.meshnetics.gb.stack.mac.type;

import com.meshnetics.gb.type.impl.custom.FiniteEnumerationElement;

/**
 * Enumeration of statuses returned by MACAssociateResponse.
 *
 * @author AKovylin
 */
public class AssociationStatus extends FiniteEnumerationElement {
    public static final AssociationStatus SUCCESSFUL =
            new AssociationStatus(TypeAssociationStatus.TYPE, 0x00, "SUCCESSFUL");
    public static final AssociationStatus PAN_AT_CAPACITY =
            new AssociationStatus(TypeAssociationStatus.TYPE, 0x01, "PAN_AT_CAPACITY");
    public static final AssociationStatus PAN_ACCESS_DENIED =
            new AssociationStatus(TypeAssociationStatus.TYPE, 0x02, "PAN_ACCESS_DENIED");

    AssociationStatus(TypeAssociationStatus type, long value, String name) {
        super(type, value, name);
    }

    public byte getCode() {
        return value[0];
    }
}
